package com.lgqz.himalayafm.http;


import com.lgqz.himalayafm.bean.RadioEntity;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

import com.lgqz.himalayafm.bean.AdvertisementEntity;
import com.lgqz.himalayafm.bean.AnchorRecyclerEntity;
import com.lgqz.himalayafm.bean.CataIndexBannerEntity;
import com.lgqz.himalayafm.bean.CategoriesEntity;
import com.lgqz.himalayafm.bean.Entity;
import com.lgqz.himalayafm.bean.RadioEntity;
import com.lgqz.himalayafm.bean.RadioHomeStationEntity;
import com.lgqz.himalayafm.bean.RadioProvinceCityEntity;
import com.lgqz.himalayafm.bean.RadioProvinceEntity;
import com.lgqz.himalayafm.bean.RankEntity;
import com.lgqz.himalayafm.bean.Entity;

import com.lgqz.himalayafm.bean.AlbumDetails;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;


/**
 * Description:Retrofit接口
 * Copyright(c) 2016,邱国兴
 * This Program is protected by copyright laws
 * Created by Little Monster on 2016/12/2.
 *
 * @author 邱国兴
 */

public interface HttpService {
    /**
     * Radio省市台具体数据
     * http://live.ximalaya.com/live-web/v1/
     * getRadiosListByType?pageNum=1&pageSize=20&provinceCode=110000&radioType=2
     */
    @GET("live-web/v1/getRadiosListByType/")
    Call<RadioProvinceCityEntity> getProCityStaData(@Query("pageNum") String pageNum,
                                                    @Query("pageSize") String pageSize,
                                                    @Query("provinceCode") String provinceCode,
                                                    @Query("radioType") String radioType);

    /**
     * Radio省市台列表数据
     * http://live.ximalaya.com/live-web/v1/getProvinceList
     */
    @GET("live-web/v1/getProvinceList/")
    Call<RadioProvinceEntity> getProStaData();

    /**
     * Radio网络台数据
     * http://live.ximalaya.com/live-web/v1/getRadiosListByType?pageNum=1&pageSize=20&radioType=3
     */
    @GET("live-web/v1/getRadiosListByType/")
    Call<RadioHomeStationEntity> getNetStaData(@Query("pageNum") int pageNum, @Query("pageSize") int pageSize,
                                               @Query("radioType") String radioType);

    /**
     * Radio国家台的数据
     * http://live.ximalaya.com/live-web/v1/getRadiosListByType?pageNum=1&pageSize=20&radioType=1
     */

    @GET("live-web/v1/getRadiosListByType/")
    Call<RadioHomeStationEntity> getCounStaData(@Query("pageNum") int pageNum, @Query("pageSize") int pageSize,
                                                @Query("radioType") String radioType);

    /**
     * Radio本地台里面的数据
     * http://live.ximalaya.com/live-web/v1/getRadiosListByType?
     * pageNum=1&pageSize=20&provinceCode=370000&radioType=2
     */
    @GET("live-web/v1/getRadiosListByType/")
    Call<RadioHomeStationEntity> getHomStaData(@Query("pageNum") int pageNum, @Query("pageSize") int pageSize,
                                               @Query("provinceCode") String provinceCode, @Query("radioType") String radioType);

    /**
     * Radio里面的数据
     */

    @GET("live-web/v4/homepage")
    Call<RadioEntity> getText();

    @GET("{discovery}/{v3}/{recommends}")
    Call<Entity> getData(@Path("discovery") String tab, @Path("v3") String level, @Path("recommends") String title,
                         @Query("channel") String channel, @Query("device") String device, @Query("includeActivity")
                                 boolean includeActivity, @Query("includeSpecial") boolean includeSpecial, @Query
                                 ("scale") int scale, @Query("version") String version);


    @GET("{v2}/{rankingList}/{group}")
    Call<RankEntity> getBangDan(@Path("v2") String level, @Path("rankingList") String title,
                                @Path("group") String group, @Query("channel") String channel, @Query("device") String device,
                                @Query("includeActivity") boolean includeActivity, @Query("includeSpecial") boolean includeSpecial,
                                @Query("scale") int scale, @Query("version") String version);


    //  http://mobile.ximalaya.com
//  /mobile/discovery/v1/categories?channel=and-a1&device=android
//  &picVersion=13&scale=2
    @GET("mobile/discovery/{v1}/{categories}")
    Call<CategoriesEntity> getCategoriesData(@Path("v1") String level, @Path("categories") String title,
                                             @Query("channel") String channel, @Query("device") String device,
                                             @Query("picVersion") int picVersion, @Query("scale") int scale);

    //    http://adse.ximalaya.com/ting?device=android&name=cata_index_banner
    //    &network=wifi&operator=0&version=4.3.98
    @GET("ting/")
    Call<CataIndexBannerEntity> getCataIndexBannerData(@Query("device") String device, @Query("name") String name,
                                                       @Query("network") String network, @Query("operator") int
                                                               operator, @Query("version") String version

    );

    //http://mobile.ximalaya.com/m/explore_user_index?device=android&page=1
    @GET("m/explore_user_index/")
    Call<AnchorRecyclerEntity> getAnchorData(@Query("device") String device, @Query("page") int page);

    //    http://adse.ximalaya.com/ting/loading
// ?appid=0&device=android&name=loading&network=wifi&operator=0&version=4.3.98
    @GET("ting/loading")
    Call<AdvertisementEntity> getAdvertisementData(@Query("appid") String appid, @Query("device") String device, @Query("name") String name, @Query("network") String network, @Query("operator") String operator, @Query("version") String version);

    //    http://mobile.ximalaya.com/mobile/discovery/v1/recommend/hotAndGuess?device=android
    @GET("mobile/{discovery}/{v1}/{recommend}/{hotAndGuess}")
    Call<Entity> getRecommend(@Path("discovery") String tab, @Path("v1") String level, @Path("recommend") String
            classify, @Path("hotAndGuess") String title, @Query("device") String device);

    //    http://mobile.ximalaya.com/mobile/v1/album?albumId=2650009&device=android&pageId=null&pageSize=20
    @GET("mobile/v1/album")
    Call<AlbumDetails> getAlbumProgram(@Query("albumId") long albumId, @Query("device") String device, @Query("pageId")
            String pageId, @Query("pageSize") String pageSize);

    //    http://mobile.ximalaya.com/mobile/v1/album/detail?albumId=2650009
    @GET("mobile/v1/album/detail")
    Call<AlbumDetails> getAlbumDetails(@Query("albumId") long albumId);
}
